<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('salesman/index')}">业务员列表</a></li>
			<li><a href="{:url('salesman/add')}">新增业务员</a></li>
		</ul>
		<br/>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>组织</th>
					<th>工号</th>
					<th>姓名</th>
					<th>业务员类型</th>
	                <th>预售功能</th>
	                <th>发货工厂</th>
					<th>接单量</th>
					<th>开关</th>
					<th width="140">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<php>$type_list = ['0'=>'否','1'=>'内部业务员','2'=>'经销商'];</php>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.fname}</td>
					<td>{$vo.fempnumber}</td>
					<td>{$vo.name}</td>
                    <td>{$type_list[$vo.type]}</td>
                    <td><if $vo.yushou>有<else/>无</if></td>
                    <td>{:factory_names($vo.out_ids)}</td>
					<td>{$vo.shipment}</td>
					<td><if $vo.switch>开<else/>关</if></td>
					<td>
						<a class="btn btn-xs btn-primary" href='{:url("salesman/edit",array("id"=>$vo["id"]))}'>编辑</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>